from sqlalchemy import Column, Integer, String, TIMESTAMP, ForeignKey
from base import Base  # 导入共享的 Base

class RedBookUserLevel(Base):
    __tablename__ = 'red_book_user_levels'
    id = Column(Integer, primary_key=True, autoincrement=True, comment="主键ID")
    name = Column(String(255), nullable=False, comment="等级名称")
    type = Column(Integer, nullable=False, comment="类型：1 分 2 时 3 天 4 月")
    val = Column(Integer, nullable=False, comment="类型对应的值")
    is_default = Column(Integer, default=0, comment="是否默认 0否 1 是")
